﻿<%@ Page Title="Vítejte" Language="C#" MasterPageFile="~/Pages/Site.Master" AutoEventWireup="true" CodeBehind="HomePage.aspx.cs" Inherits="Altairis.FluffyCloud.WebCore.Pages.HomePage" %>
<asp:Content ContentPlaceHolderID="Main" runat="server">
    <asp:FormView ID="PageFormView" runat="server" DataSourceID="PageObjectDataSource" RenderOuterTable="false">
        <ItemTemplate>
            <asp:LoginView runat="server">
                <RoleGroups>
                    <asp:RoleGroup Roles="$Administrators">
                        <ContentTemplate>
                            <p class="small r">
                                <asp:Literal runat="server" Text='<%# Eval("Version", "Verze: {0:d} {0:T} | ") %>' />
                                <asp:Literal runat="server" Text='<%# Eval("UserName", "Uživatel: {0} | ") %>' />
                                <asp:Literal runat="server" Text='<%# Eval("IpAddress", "IP: {0} | ") %>' />
                                <asp:HyperLink runat="server" NavigateUrl="<%$ RouteUrl: RouteName=WikiPageHistory,Slug=HomePage %>" Text="historie" />
                                |
                                    <asp:HyperLink runat="server" NavigateUrl="<%$ RouteUrl: RouteName=WikiPageEdit,Slug=HomePage %>" Text="editovat" />
                                |
                                    <asp:HyperLink runat="server" NavigateUrl="<%$ RouteUrl: RouteName=WikiPageNew %>" Text="nová stránka" />
                            </p>
                        </ContentTemplate>
                    </asp:RoleGroup>
                </RoleGroups>
            </asp:LoginView>
            <p>
                <my:WikiMarkup runat="server" Text='<%# Eval("Body") %>' />
            </p>
        </ItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="PageObjectDataSource" runat="server" TypeName="Altairis.Sewen.PageStoreManager" DataObjectTypeName="Altairis.Sewen.SewenPage" SelectMethod="LoadPage">
        <SelectParameters>
            <asp:Parameter Name="name" Type="String" DefaultValue="HomePage" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>